queue = list(range(1,31))

while len(queue)>15:
    i = 1
    while i<8:
        queue.append(queue.pop(0))
        print(queue)
        i += 1
    print("%d下船了"%queue.pop(0))
    